<?
/**
 *  Copyright 2008 Ivan Grosny 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at 
 *  http://www.apache.org/licenses/LICENSE-2.0 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *  @author Ivan Grosny
 */

session_start();

include_once '../config/default.php';

Db::connect();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Mywea v.<?= VERSION ?></title>
    <link href="../stylesheets/application.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../javascripts/prototype.js"></script>
	<script type="text/javascript" src="../javascripts/toolbar.js"></script>
	<script type="text/javascript" src="../javascripts/query.js"></script>	
	<script type="text/javascript" src="../javascripts/result.js"></script>	
   	<script type="text/javascript" src="../javascripts/navigation.js"></script>	
	<script type="text/javascript" src="../javascripts/slider.js"></script>	      
	<script type="text/javascript" src="../javascripts/effects.js"></script>	            
	<script type="text/javascript" src="../javascripts/dragdrop.js"></script>	
	<script type="text/javascript" src="../javascripts/mywea.js"></script>
	<script type="text/javascript" src="../javascripts/scriptaculous.js"></script>
	<script type="text/javascript" src="../javascripts/modalbox.js"></script>
	<script type="text/javascript" src="../javascripts/schema.js"></script>
	<script type="text/javascript" src="../javascripts/resulttoolbar.js"></script>    
</head>

<body>
<!-- Toolbar area -->
<div id="toolbar">
	<ul>
		<li id="back" class="disabled"><a href="javascript:history_back()" accesskey="B" rel="back" title="Go back in query history"><span>Back</span></a></li>
		<li id="forward" class="disabled"><a href="javascript:history_forward()" accesskey="F" rel="back" title="Go forward in query history"><span>Forward</span></a></li>
		<li><a href="javascript:run()" accesskey="R" rel="run" title="Execute the entered query"><span>Run</span></a></li>
		<li><a href="schema.php?action=new" title="Create new schema" onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;"><span>New shcema</span></a></li>
		<li><a href="../index.php?logout=true" accesskey="L" rel="logout" title="Logout Mywea appplication"><span>Logout</span></a></li>
	</ul>
</div>
<div id="navigation">
	<? $dbs = Db::list_dbs() ?>
	<? include 'views/navigation/navigation.php' ?>
</div>
<div id="vertical_slider"></div>

<div id="query">
	<textarea id="query_area" rows="4" cols="20"></textarea>
</div>
<div id="horizontal_slider"></div>
<div id="result">
	<div id="result_toolbar">
	    <input type="button" id="result_edit_button" disabled="disabled" value="Edit" onclick="Result.setEditable()" />
    </div>
    <div id="result_area">
    </div>
</div>

</body>
</html>
